lib/sign: make ed25519 engine non-public
authorDenis Pynkin <denis.pynkin@collabora.com>
Wed, 4 Dec 2019 20:42:52 +0000 (20:42 +0000)
committerDenis Pynkin <denis.pynkin@collabora.com>
Wed, 25 Mar 2020 12:23:55 +0000 (15:23 +0300)
Remove unneeded public declaration for ed25519 signing engine.

Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com>
apidoc/ostree-sections.txt
src/libostree/libostree-devel.sym
src/libostree/ostree-sign-ed25519.c
src/libostree/ostree-sign-ed25519.h

index e61b46c3b36523819d6141b100d47e078773e6e2..4dcdc482607e426e40239f28d6ff1a1b4b8a2cfd 100644 (file)
@@ -709,7 +709,6 @@ ostree_kernel_args_to_string
 <SECTION>
 <FILE>ostree-sign</FILE>
 OstreeSign
-OstreeSignEd25519
 ostree_sign_list_names
 ostree_sign_commit
 ostree_sign_commit_verify
@@ -725,5 +724,4 @@ ostree_sign_set_sk
 ostree_sign_summary
 <SUBSECTION Standard>
 ostree_sign_get_type
-ostree_sign_ed25519_get_type
 </SECTION>
index 730eac3e9b5e67cf17955574fb2c68e3c025af88..4348ab8d6db19a12c6e9a0c3cab5a8e4439e2e70 100644 (file)
@@ -36,7 +36,6 @@ global:
   ostree_sign_add_pk;
   ostree_sign_set_sk;
   ostree_sign_summary;
-  ostree_sign_ed25519_get_type;
 } LIBOSTREE_2020.1;
 
 /* Stub section for the stable release *after* this development one; don't
index 2d5bdb16efbd773f5b705e5fdf8d18bf446ba656..d28a5c32813fd44de06bd176f2dacbfefb9d767a 100644 (file)
@@ -55,7 +55,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (OstreeSignEd25519, g_object_unref)
 static void
 ostree_sign_ed25519_iface_init (OstreeSignInterface *self);
 
-G_DEFINE_TYPE_WITH_CODE (OstreeSignEd25519, ostree_sign_ed25519, G_TYPE_OBJECT,
+G_DEFINE_TYPE_WITH_CODE (OstreeSignEd25519, _ostree_sign_ed25519, G_TYPE_OBJECT,
         G_IMPLEMENT_INTERFACE (OSTREE_TYPE_SIGN, ostree_sign_ed25519_iface_init));
 
 static void
@@ -76,13 +76,13 @@ ostree_sign_ed25519_iface_init (OstreeSignInterface *self)
 }
 
 static void
-ostree_sign_ed25519_class_init (OstreeSignEd25519Class *self)
+_ostree_sign_ed25519_class_init (OstreeSignEd25519Class *self)
 {
   g_debug ("%s enter", __FUNCTION__);
 }
 
 static void
-ostree_sign_ed25519_init (OstreeSignEd25519 *self)
+_ostree_sign_ed25519_init (OstreeSignEd25519 *self)
 {
   g_debug ("%s enter", __FUNCTION__);
 
@@ -111,7 +111,7 @@ gboolean ostree_sign_ed25519_data (OstreeSign *self,
 
   g_debug ("%s enter", __FUNCTION__);
   g_return_val_if_fail (OSTREE_IS_SIGN (self), FALSE);
-  OstreeSignEd25519 *sign = ostree_sign_ed25519_get_instance_private(OSTREE_SIGN_ED25519(self));
+  OstreeSignEd25519 *sign = _ostree_sign_ed25519_get_instance_private(OSTREE_SIGN_ED25519(self));
 
 #ifdef HAVE_LIBSODIUM
   guchar *sig = NULL;
@@ -163,7 +163,7 @@ gboolean ostree_sign_ed25519_data_verify (OstreeSign *self,
   g_return_val_if_fail (data != NULL, FALSE);
   gboolean ret = FALSE;
 
-  OstreeSignEd25519 *sign = ostree_sign_ed25519_get_instance_private(OSTREE_SIGN_ED25519(self));
+  OstreeSignEd25519 *sign = _ostree_sign_ed25519_get_instance_private(OSTREE_SIGN_ED25519(self));
 
   if (signatures == NULL)
     {
@@ -284,7 +284,7 @@ gboolean ostree_sign_ed25519_clear_keys (OstreeSign *self,
   g_return_val_if_fail (OSTREE_IS_SIGN (self), FALSE);
 
 #ifdef HAVE_LIBSODIUM
-  OstreeSignEd25519 *sign = ostree_sign_ed25519_get_instance_private(OSTREE_SIGN_ED25519(self));
+  OstreeSignEd25519 *sign = _ostree_sign_ed25519_get_instance_private(OSTREE_SIGN_ED25519(self));
 
   /* Clear secret key */
   if (sign->secret_key != NULL)
@@ -326,7 +326,7 @@ gboolean ostree_sign_ed25519_set_sk (OstreeSign *self,
   g_return_val_if_fail (OSTREE_IS_SIGN (self), FALSE);
 
 #ifdef HAVE_LIBSODIUM
-  OstreeSignEd25519 *sign = ostree_sign_ed25519_get_instance_private(OSTREE_SIGN_ED25519(self));
+  OstreeSignEd25519 *sign = _ostree_sign_ed25519_get_instance_private(OSTREE_SIGN_ED25519(self));
 
   ostree_sign_ed25519_clear_keys (self, error);
 
@@ -391,7 +391,7 @@ gboolean ostree_sign_ed25519_add_pk (OstreeSign *self,
   g_return_val_if_fail (OSTREE_IS_SIGN (self), FALSE);
 
 #ifdef HAVE_LIBSODIUM
-  OstreeSignEd25519 *sign = ostree_sign_ed25519_get_instance_private(OSTREE_SIGN_ED25519(self));
+  OstreeSignEd25519 *sign = _ostree_sign_ed25519_get_instance_private(OSTREE_SIGN_ED25519(self));
   g_autofree char * hex = NULL;
   gpointer key = NULL;
 
@@ -446,7 +446,7 @@ _ed25519_add_revoked (OstreeSign *self,
   g_debug ("%s enter", __FUNCTION__);
   g_return_val_if_fail (OSTREE_IS_SIGN (self), FALSE);
 
-  OstreeSignEd25519 *sign = ostree_sign_ed25519_get_instance_private(OSTREE_SIGN_ED25519(self));
+  OstreeSignEd25519 *sign = _ostree_sign_ed25519_get_instance_private(OSTREE_SIGN_ED25519(self));
   g_autofree char * hex = NULL;
   gpointer key = NULL;
 
index 6e5dd6657cd6c37ae10043f9bff3e9376f07afdf..76c7e14d426c0e7e0b835ea60f3a31ca1df19957 100644 (file)
 
 G_BEGIN_DECLS
 
-#define OSTREE_TYPE_SIGN_ED25519 (ostree_sign_ed25519_get_type ())
+#define OSTREE_TYPE_SIGN_ED25519 (_ostree_sign_ed25519_get_type ())
 
-_OSTREE_PUBLIC
-GType ostree_sign_ed25519_get_type (void);
+GType _ostree_sign_ed25519_get_type (void);
 
 G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 typedef struct _OstreeSignEd25519 OstreeSignEd25519;
 typedef struct { GObjectClass parent_class; } OstreeSignEd25519Class;
 
-static inline OstreeSignEd25519 *OSTREE_SIGN_ED25519 (gpointer ptr) { return G_TYPE_CHECK_INSTANCE_CAST (ptr, ostree_sign_ed25519_get_type (), OstreeSignEd25519); }
-static inline gboolean OSTREE_IS_SIGN_ED25519 (gpointer ptr) { return G_TYPE_CHECK_INSTANCE_TYPE (ptr, ostree_sign_ed25519_get_type ()); }
+static inline OstreeSignEd25519 *OSTREE_SIGN_ED25519 (gpointer ptr) { return G_TYPE_CHECK_INSTANCE_CAST (ptr, _ostree_sign_ed25519_get_type (), OstreeSignEd25519); }
+static inline gboolean OSTREE_IS_SIGN_ED25519 (gpointer ptr) { return G_TYPE_CHECK_INSTANCE_TYPE (ptr, _ostree_sign_ed25519_get_type ()); }
 
 G_GNUC_END_IGNORE_DEPRECATIONS